<template>
	<!-- <view class="content"
	 :style="{'background-color': color1,
	 'background-image': 'linear-gradient(180deg,'+ color1 +' 0%,'+ color2+' 100%)'}"> -->
	 
	 	<view class="content" :style="color1">
		<view class="headbox">
			<image src="/static/fanghu.png" class="headbox_img" ></image>
			<view class="headbox_soo">请长按二维码识别进 微信群 预防失联</view>
		</view>
		
		<view class="tips">
				如无法进群请过一会再重新识别
		</view>
		
		<image :src="iamge" class="showbox" mode="widthFix" ></image>
	</view>
</template>

<script>
	import {curl} from 'common/api.js';
	export default {
		data() {
			return {
				iamge:'',
				color1:'#fafafa',
				color2:'#ffffff',
			}
		},
		onShow() {
			uni.setNavigationBarTitle({
				title:'长按识别'
			})
				
		},
		onLoad(ret) {
			
			console.log(ret);
			var that=this;
			curl('index/getcolor', {}).then((res) => {
				console.log(res.data);
					that.color1=res.data.color1
					that.color2=res.data.color2
				
			});
			var u=ret.u;
			var s=ret.s;
	
		
			curl('index/huoma', {s:s,u:u}).then((res) => {
				console.log(res);
				
					that.iamge=res.data
				
			});
			
		},
		methods: {
		
		}
	}
</script>

<style>
	
	.showbox{
		width:680rpx;margin:40rpx auto;display: block;
	}
	.tips{
		width: 100%;
		height: 56rpx;
		background: #78cdff;
		border-radius: 4px;
		text-align: center;
		line-height: 56rpx;
		margin: 20rpx auto;
		font-weight: bold;
		font-size: 32rpx;
		text-indent: 3px;
		color: #ffffff;
	}
	.headbox_img{
		width: 48rpx;height: 48rpx;display: block;margin-left: 30rpx;
	}
	.headbox{
		width: 100%;
		height: 100rpx;
		background: rgb(241, 249, 236);
		color: #91d09e;
		display: flex;
		align-items: center;
		font-size: 16px;
		text-indent: 10px;
		font-weight: bold;
	}
</style>
